package com.sskj.givecoin.p.activity;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.givecoin.MyAppLication;
import com.sskj.givecoin.m.HttpConfig;
import com.sskj.givecoin.m.bean.AseetListBean;
import com.sskj.givecoin.m.bean.HttpData;
import com.sskj.givecoin.m.http.JsonCallBack;
import com.sskj.givecoin.p.base.BasePresenter;
import com.sskj.givecoin.v.activity.AssetActivity;


public class AssetPresenter extends BasePresenter<AssetActivity> {



    public void loadData() {
        OkGo.<HttpData<AseetListBean>>post(HttpConfig.BASE_URL+HttpConfig.ASEET_LIST)
                .params("mobile", MyAppLication.getMobile())
                .execute(new JsonCallBack<HttpData<AseetListBean>>() {
                    @Override
                    protected void _onSuccess(Response<HttpData<AseetListBean>> response) {
                        HttpData<AseetListBean> httpListData = response.body();
                        if (httpListData.getStatus() == 200) {
                            mView.refresh(httpListData.getData());
                        }
                    }
                });
    }
}
